package net.timico.webservice;

import java.net.URL;

import javax.xml.namespace.QName;
import javax.xml.ws.Service;

public class InfoConnexionClient {

	 public static ObjectAMQ getConnexionAMQ(String queueName, String userName, String userId, String userPwd) throws Exception {
		 	
		 	//InfoConnexionPublisher.lauchWebService();
		 	
	    	URL url = new URL("http://"+ InfoConnexionPublisher.getServerAddr() +"/wsChat?wsdl");
	    	QName qname = new QName("http://webservice.timico.net/", "InfoConnexionWSService");
	    	Service service = Service.create(url, qname);
	    	InfoConnexion ifc = service.getPort(InfoConnexion.class);
	    	
	    	return ifc.connexionTopic(queueName, userName, userId, userPwd);
	 } 
}
